You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introducing Code Coverage Report. Every time a PR is being merge to main, it will run test:coverage and save the code coverage summary as an artifact. At the same time, a github action cache will store the last run id. When a PR is created and anytime a new commit is pushed to the PR, the action will pull coverage summary from main (which is stored as an artifact), and then run the test-coverage on current code. Using a shell script, the two code coverage summaries will be compared in order to produce the report.
Currently, it has a 1% threshold, which can be modified in the compare-coverage.sh. So, if the current code changes went down by 1% (for either lines, statement, functions or branch), it will cause the action to post a warning along with the coverage report summary.
Currently, if the test fail, it will trigger a failure (this is the same as today). But if the coverage report dips below the threshold, then this should not fail the PR.
This can be improved in so many ways:
code coverage is showing to shift even when doing non JS/TS code changes
getting coverage report summary every commit can be annoying?
::error::Lines coverage has decreased by more than 1.0% (.03%)
::error::Statements coverage has decreased by more than 1.0% (.03%)
::error::Branches coverage has decreased by more than 1.0% (.03%)
::error::Functions coverage has decreased by more than 1.0% (.08%)
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introducing Code Coverage Report. Every time a PR is being merge to
main
, it will run test:coverage and save the code coverage summary as an artifact. At the same time, a github action cache will store the last run id. When a PR is created and anytime a new commit is pushed to the PR, the action will pull coverage summary frommain
(which is stored as an artifact), and then run the test-coverage on current code. Using a shell script, the two code coverage summaries will be compared in order to produce the report.Currently, it has a 1% threshold, which can be modified in the compare-coverage.sh. So, if the current code changes went down by 1% (for either lines, statement, functions or branch), it will cause the action to post a warning along with the coverage report summary.
Currently, if the test fail, it will trigger a failure (this is the same as today). But if the coverage report dips below the threshold, then this should not fail the PR.
This can be improved in so many ways:
Ticket Link
https://mattermost.atlassian.net/browse/MM-63199
Checklist
E2E iOS tests for PR
.Device Information
This PR was tested on:
Screenshots
Release Note